package com.kundi.dooradmin.mapper;

import com.kundi.dooradmin.entity.IndustryInformation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * Author 赵恒
 * Date 2020/6/24
 */
public interface IndustryInformationMapper extends Mapper<IndustryInformation> {
    @Select("select id, title, content, date, origin, author from tb_industry_information order by date desc")
    List<IndustryInformation> getAll();

    @Select("select id, title, content, date, origin, author from tb_industry_information where id = #{id}")
    IndustryInformation getIndustryById(@Param("id") Integer id);

    @Select("select image from tb_industry_information where id = #{id}")
    IndustryInformation getIndustryByIdWithImage(@Param("id") Integer id);

}
